package cn.yuxiaoyuan.service.impl;

import cn.yuxiaoyuan.common.util.R;
import cn.yuxiaoyuan.mapper.PermissionMapper;
import cn.yuxiaoyuan.service.IPermissionService;
import cn.yuxiaoyuan.service.base.impl.BaseServiceImpl;
import cn.yuxiaoyuan.system.domain.Permission;
import cn.yuxiaoyuan.system.query.PermissionQuery;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.Data;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author solargen
 * @version 1.0
 * @date 2025/5/19 9:49
 */
@Service
public class PermissionServiceImpl extends BaseServiceImpl<Permission> implements IPermissionService {
    @Autowired
    private PermissionMapper permissionMapper;
    @Override
    public R pageList(PermissionQuery permission) {
        PageHelper.startPage(permission.getPage(),permission.getSize());
        return R.ok(new PageInfo<>(permissionMapper.pageList(permission)));
    }
}
